package com.bite.order.controller;


import com.bite.order.model.OrderInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.bite.order.service.OrderService;

@RequestMapping("/order")
@RestController
@Slf4j
public class OrderController {
    @Autowired
    public OrderService orderService;


    @RequestMapping("/{orderId}")
    public OrderInfo selectById(@PathVariable("orderId") Integer orderId) {
        log.info("获取订单 orderId: " + orderId);
        return orderService.selectById(orderId);
    }
}
